#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
int main()
{
    int n = 0, i = 0;
    long long int sum = 0;
    scanf("%d",&n);
    int arr[1000] = { 2 };
    for (i = 0; i < 999; i++)
    {
        arr[i + 1] = arr[i] + 3;
    }
    for (i = 0; i < n; i++)
    {
        sum += arr[i];
    }
    printf("%lld", sum);
    return 0;
}